Tables are a powerful feature for Text notes, since editing them is generally easy.

To create a table, simply press the table button and select with the mouse the desired amount of columns and rows, as indicated in the adjacent figure.

Since v0.107.0, the same menu starts with an Insert table… item, for a table larger than the grid or to type its size instead:

  1. Click the button and select Insert table…. A small form opens at the cursor.
  2. Enter the number of Rows (up to 1000) and Columns (up to 100). The table can have at most 5000 cells in total, for example 1000 rows of 5 columns.
  3. Press Insert or Enter.

To close the form without inserting a table, press Esc or click outside it. From the keyboard, Tab moves between Insert table… and the grid while the menu is open.

Formatting toolbar

When a table is selected, a special formatting toolbar will appear:

Context menu

Since v0.106.0, right-clicking anywhere inside a table opens a context menu with the most common table operations:

Right-clicking a cell that is not part of the current selection moves the cursor there first, so the menu always applies to the cell under the pointer.

Navigating a table

Resizing cells

Inserting new rows and new columns

Moving rows and columns

Since v0.106.0, rows and columns can be reordered with the keyboard:

Merged cells are never split by a move. The rows or columns held together by a merged cell travel as one block, and moving toward such a block jumps over it entirely.

When the table has a header row, a header row moved below the header area becomes a regular row, and a regular row moved into the header area becomes a header row. Header columns behave the same way.

Outside of tables, Alt+Left and Alt+Right keep navigating the note history, and Alt+Up and Alt+Down keep moving the current paragraph.

Sorting rows

Since v0.107.0, the rows of a table can be sorted by the values of one column:

Header rows always stay at the top of the table and are never sorted. A sort can be undone with Ctrl+Z.

How values are compared

Each cell is read as plain text, so formatting does not affect the order. Trilium then detects what kind of value the cell holds:

Kind Examples Compared by
Time 15:02, 15:02:38, 3:02 PM The time of day.
Date 2026-09-30, 2026-09-30 15:02, 30 September 2026, Wednesday, 30 September 2026, 2026-09-30T15:02:38+03:00 The date and time.
Number 12, -3.5, 1,234.56, $ 12.04, 21 RON, 24.5m The numeric value.
Text Anything else. Alphabetically, ignoring case, with numbers inside the text in numeric order (Item 9 before Item 10). Accents count, so a and á differ.
Empty An empty cell, or one holding only spaces. Not compared. Empty cells always go last.

Ascending order puts times first, then dates, numbers and text. Descending order reverses it. Empty cells go last in both directions.

Numbers, dates and times with the same value are ordered by their text, so 5 apples comes before 5 pears. Rows whose cells hold the same text, ignoring case, keep their relative order.

Merged cells

Rows joined by a merged cell are kept together and move as one block. The block is sorted by the value in its first row. When the block has more than one cell in the sorted column, the other cells do not affect the order, and a message says so: Some rows were sorted together because merged cells tie them to each other.

When the selection covers only part of such a block, the whole block is sorted.

Merging cells

To merge two or more cells together, simply select them via drag & drop and press the  button from the formatting toolbar.

More options are available by pressing the arrow next to it:

Merge selected cells and Unmerge cells are available since v0.107.0. Merging and splitting are also available by right-clicking the selected cells, via the context menu, where Unmerge cells is in the Split cell submenu.

Table properties

The table properties can be accessed via the  button and allows for the following adjustments:

The table will immediately update to reflect the changes, but the Save button must be pressed for the changes to persist.

Cell properties

Similarly to table properties, the  button opens a popup which adjusts the styling of one or more cells (based on the user's selection).

The following options can be adjusted:

The cell will immediately update to reflect the changes, but the Save button must be pressed for the changes to persist.

Border and background colors

The border and background colors of tables and cells adapt to the theme, the same way as text colors do. A color picked from the palette, chosen with the color picker or typed in is shown in a lighter or darker shade that suits the current theme, so borders stay visible and text stays readable on the background. The hue stays the same, and the table keeps the color as it was picked.

Colors applied with older versions of Trilium are shown exactly as they were picked, until the note is next edited.

Older browsers that can't adapt colors show them exactly as they were picked.

Caption

Press the  button to insert a caption or a text description of the table, which is going to be displayed above the table.

Table borders

By default, tables will come with a predefined gray border.

To adjust the borders, follow these steps:

  1. Select the table.
  2. In the floating panel, select the Table properties option ().
    1. Look for the Border section at the top of the newly opened panel.
    2. This will control the outer borders of the table.
    3. Select a style for the border. Generally Single is the desirable option.
    4. Select a color for the border.
    5. Select a width for the border, expressed in pixels.
  3. Select all the cells of the table and then press the Cell properties option ().
    1. This will control the inner borders of the table, at cell level.
    2. Note that it's possible to change the borders individually by selecting one or more cells, case in which it will only change the borders that intersect these cells.
    3. Repeat the same steps as from step (2).

Tables with invisible borders

Tables can be set to have invisible borders in order to allow for basic layouts (columns, grids) of text or images without the distraction of their border:

  1. First insert a table with the desired number of columns and rows.
  2. Select the entire table.
  3. In Table properties, set:
    1. Style to Single
    2. Color to transparent
    3. Width to 1px.
  4. In Cell Properties, set the same as on the previous step.

Table indentation

Since v0.104.1, tables can be indented as a block (the whole table moves, rather than just the content of a cell).

  1. Click the button to select the entire table. Otherwise, the indentation applies only to the current cell's content.
  2. Press Tab to increase the indent, or Shift+Tab to decrease it. Alternatively, use the indentation buttons in the formatting toolbar.

Markdown does not support indented tables, so the indentation is lost when converting to Markdown.

Markdown import/export

Simple tables are exported in GitHub-flavored Markdown format (e.g. a series of | items). If the table is found to be more complex (it contains HTML elements, has custom sizes or images), the table is converted to a HTML one instead.

Generally formatting loss should be minimal when exported to Markdown due to the fallback to HTML formatting.